package com.qf.mapper;

import com.qf.entity.TDirtyWord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
杨威
2021/10/26
8:52
*/
public interface DirtyWordMapper {
    @Select("select * from t_dirtyword")
    List<TDirtyWord> selectAll();
    @Select("select * from t_dirtyword where id=#{id}")
    TDirtyWord selectById(Integer id);
    @Select("select * from t_dirtyword where id=#{id} and owntype=#{owntype}")
    TDirtyWord selectByIdAndByOwntype(@Param("id") Integer id,@Param("owntype") Integer owntype);
    @Insert("insert into t_dirtyword values (0,#{dirtyword},#{owntype},#{creater})")
    Integer insert(TDirtyWord tDirtyWord);
    Integer update(TDirtyWord tDirtyWord);
}
